/*
 * @Author: Hanlilei h15539352763@163.com
 * @Date: 2022-05-23 09:28:07
 * @LastEditors: Hanlilei h15539352763@163.com
 * @LastEditTime: 2022-05-23 09:28:18
 * @FilePath: \map\js\rem.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
function getRem(design_w, unit) {
  var html = document.getElementsByTagName("html")[0];
  var real_w = document.documentElement.clientWidth;
  real_w > design_w && (real_w = design_w);
  html.style.fontSize = (real_w / design_w) * unit + "px";
}
getRem(1920, 100);
//window.addEventListener("resize",getRem);
window.onresize = function () {
  getRem(1920, 100);
};
